<template>
  <div>
    <h2>test testGet</h2>
    <input type="text" v-model="stu_id" />
    <button @click="TestParams">测试get请求的params参数</button>
  </div>
</template>

<script>
import { TestGet } from "../api/ajax";
export default {
  data() {
    return {
      result: [],
      stu_id: "",
    };
  },
  async mounted() {
    console.log(TestGet);
    let url = "/search_info_item";
    let params = { stu_id: "06" };
    let data = await TestGet(url, params);
    // this.result =
    console.log(data);
    this.result = data.data;
    console.log(this.result);
  },
  methods: {
    async TestParams() {
      let url = `/search_entry/${this.stu_id}`;
      const params = {};
      let result = await TestGet(url, params);
      console.log(result);
    },
  },
};
</script>

<style lang="scss" scoped>
</style>